package com.syedu.day11;

/**
 * description：char类型的包装类
 * @author Administrator
 * @date 2022/3/24 15:08
 */
public class CharacterDemo {
    public static void main(String[] args) {
        Character c1 = 'A';
        Character c2 = 'a';
        Character c3 = '我';
        Character c4 = ' ';
        Character c5 = '\u0000';

        //1.判断字符是否是字母,字母不是只有英文字母
        boolean letter = Character.isLetter(c1);
        System.out.println(letter);

        //2.判断字符是否是数字
        boolean digit = Character.isDigit(c2);
        System.out.println(digit);

        //3.判断字符是否是空白
        boolean whitespace = Character.isWhitespace(c4);
        System.out.println(whitespace);

        //4.
        boolean upperCase = Character.isUpperCase(c1);
        boolean lowerCase = Character.isLowerCase(c2);
        System.out.println(upperCase);
        System.out.println(lowerCase);
    }
}